///////////////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------
#ifndef __I_OBJECT_LOADER_H__
#define __I_OBJECT_LOADER_H__

//-----------------------------------------------------------------------------

#include <Config.h>
#include <vector>

class	File;
class	Object;

//-----------------------------------------------------------------------------

class IObjectLoader
{
	friend class Object;
private:
	static	std::vector<IObjectLoader*>	m_objectLoaders;

protected:
	static	void							RegisterLoader(IObjectLoader*	loader);
	static	void							UnregisterLoader(IObjectLoader*	loader);
	static	void							UnregisterLoaders();

public:
	static	IObjectLoader*					GetLoaderForFile(File* file);

	virtual	bool							CanLoad(File* file) = 0;
	virtual bool							Load(File* file) = 0;
	virtual	Object*							LoadObject(File* file) = 0;

};

#endif // __I_OBJECT_LOADER_H__
//-----------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////
